package com.crm.controller.hy;

import com.crm.pojo.CrmDepartment;
import com.crm.utils.R;
import com.crm.vo.AddressEmployeeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 查询部门
 */
@Api(value = "部门",tags = "部门api")
@Controller
@RequestMapping("/department")
public class DepartmentController {
    R r=new R();

    @GetMapping("/findAll")
    @ApiOperation(value = "查询所有部门", httpMethod = "GET", response = R.class)
    @ResponseBody
    public R findAll(){
        List<CrmDepartment> crmDepartments=new ArrayList<>();
      CrmDepartment department=new CrmDepartment(1,"业务一部");
      crmDepartments.add(department);
      return r.okR(crmDepartments);
    }
}
